home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / d.t.p / utils / others / pcal / pcal.doc < prev    next >
Text File  |  1994-02-13  |  35KB  |  793 lines

  1.  
  2.  
  3.  
  4. PCAL(1)                                                   PCAL(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        pcal - generate PostScript calendars
  9.  
  10. SSYYNNOOPPSSIISS
  11.        ppccaall [--ee|--ff _c_a_l] [--oo _f_i_l_e] [--jj | --JJ] [--ll | --pp] [--mm | --MM]
  12.             [--bb _d_a_y|all] [--gg _d_a_y|all] [--OO] [--GG]
  13.             [--ss [[_d_a_t_e___s_h_a_d_e]][[//_f_i_l_l___s_h_a_d_e]]_] _[--FF _d_a_y_] _[--AA_|--EE_]
  14.             _[--tt _t_i_t_l_e___f_o_n_t_] _[--dd _d_a_y___f_o_n_t_] _[--nn _t_e_x_t___f_o_n_t_[_/_s_i_z_e_]_]
  15.             _[--LL _f_o_o_t_e_r___s_t_r_] _[--CC _f_o_o_t_e_r___s_t_r_] _[--RR _f_o_o_t_e_r___s_t_r_]
  16.             _[--NN _n_o_t_e_s___s_t_r_] _[--DD _s_y_m_b_o_l_] _[--UU _s_y_m_b_o_l_] _[--xx _x_s_c_a_l_e_]
  17.             _[--yy _y_s_c_a_l_e_] _[--XX _x_t_r_a_n_s_] _[--YY _y_t_r_a_n_s_] _[--II_] _[--BB_]
  18.             _[--SS _| --kk _| --KK_] _[--ww_] _[--hh _| --uu _| --vv_] _[_m_o_n_t_h_] _[_y_e_a_r_]
  19.             _[_n_m_o_n_t_h_s_]
  20.  
  21. DDEESSCCRRIIPPTTIIOONN
  22.        _P_c_a_l generates PostScript to produce landscape or portrait
  23.        calendars for any month and year.  The arguments mmoonntthh,
  24.        yyeeaarr, and nnmmoonntthhss, if provided, should be numeric.  The
  25.        mmoonntthh value should be in the range 1 - 12, and the yyeeaarr
  26.        value should be specified as 1 or 2 digits or as the full
  27.        4 digit year.  If no numeric arguments are provided, the
  28.        calendar for the current month and year will be generated.
  29.  
  30.        If one numeric argument is provided, it is interpreted as
  31.        the yyeeaarr value, and calendars for the entire year will be
  32.        generated.  Otherwise, nnmmoonntthhss months, starting with mmoonntthh
  33.        and yyeeaarr, will be generated.
  34.  
  35.        For whole-year calendars (i.e. the --ww option is given),
  36.        the command line arguments are interpreted somewhat dif-
  37.        ferently.  By default, all months in the current year are
  38.        printed, starting with January.  If the mmoonntthh argument
  39.        alone is given, it is expected to be the desired yyeeaarr to
  40.        print, and prints all of the months in the given year.  If
  41.        both mmoonntthh and yyeeaarr are given, then 12 consecutive months
  42.        are printed starting at the given month and year.  If the
  43.        mmoonntthh, yyeeaarr, and nnmmoonntthhss arguments are all present, print-
  44.        ing begins with the given month and year and nnmmoonntthhss
  45.        months are printed, rounded up to the nearest multiple of
  46.        12.
  47.  
  48.        TThhee DDaattee FFiillee
  49.  
  50.        By default, _p_c_a_l simply prints an empty calendar.  Its
  51.        real power is in its ability to place ``events'' in appro-
  52.        priate days on the calendar, thus allowing the user to
  53.        create personalized calendars.  This is achieved through
  54.        the use of the ``date file''.
  55.  
  56.        The date file is named _._c_a_l_e_n_d_a_r (_p_c_a_l_._d_a_t under MS-DOS),
  57.        or _c_a_l_e_n_d_a_r for compatibility with older versions.  _P_c_a_l
  58.        will look in several places for such a file.  First, if
  59.        the environment variable PPCCAALL__DDIIRR is defined, _p_c_a_l
  60.        searches the directory indicated by that variable.  Next,
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PCAL(1)                                                   PCAL(1)
  71.  
  72.  
  73.        _p_c_a_l searches the user's home directory (as specified by
  74.        the HHOOMMEE environment variable).  If neither PPCCAALL__DDIIRR nor
  75.        HHOOMMEE is defined, _p_c_a_l searches the current directory
  76.        instead.  Finally, the directory where the _p_c_a_l executable
  77.        resides will be checked.  If no date file is found, an
  78.        empty calendar is printed; no error is generated.
  79.  
  80.        If a date file is found, it will be searched for lines
  81.        with leading dates matching the requested month and year.
  82.        Any text following the dates found will be printed on the
  83.        calendar under the appropriate day of the month.  Dates in
  84.        the _._c_a_l_e_n_d_a_r file may be expressed in any of several for-
  85.        mats:
  86.  
  87.             <<oorrddiinnaall>> <<ddaayy__ssppeecc>> iinn <<mmoonntthh__ssppeecc>>{{**}} {{<<tteexxtt>>}}
  88.             <<ddaayy__ssppeecc>> <<pprreepp>> <<ddaattee__ssppeecc>>{{**}} {{<<tteexxtt>>}}
  89.             <<ddaattee__ssppeecc>>{{**}} {{<<tteexxtt>>}}
  90.  
  91.        Where:
  92.  
  93.             <month_name>   := first 3+ characters of name of month, or ``all''
  94.             <month_spec>   := <month_name>, or ``year''
  95.             <day_spec>     := first 3+ characters of name of weekday, ``day'',
  96.                            ``weekday'', ``workday'', ``holiday'', ``nonweekday'',
  97.                            ``nonworkday'', ``nonholiday'', ``new_moon'',
  98.                            ``first_quarter'', ``full_moon'', or ``last_quarter''
  99.             <ordinal> := any ordinal number (``1st'', ``2nd'', etc.), ``first'' ... ``fifth'',
  100.                            ``last'', ``odd'', ``even'', or ``all''
  101.             <prep>         := ``before'', ``preceding'', ``after'', ``following'',
  102.                            ``on_or_before'' (``oob''), or ``on_or_after'' (``ooa'')
  103.             <sep>          := one or more non-numeric, non-space, non-`*' characters
  104.             <month>   := a numeric month (1-12)
  105.             <day>          := day of month (1-31)
  106.             <year>         := a numeric year
  107.  
  108.        If the --AA option (American date formats, the default) is
  109.        given:
  110.  
  111.             <date_spec>    := <month_name> <day> | <month><sep><day>{<sep><year>}
  112.  
  113.        If the --EE option (European date formats) is given:
  114.  
  115.             <date_spec>    := <month_name> <day> | <month><sep><day>{<sep><year>}
  116.  
  117.        _P_c_a_l also allows format specifiers in both the text and
  118.        foot strings (see the --LL, --CC, --RR, and --NN options below);
  119.        each will be replaced by a corresponding string as out-
  120.        lined in the table below.  Most of these are derived from
  121.        the ANSI C ssttrrffttiimmee(()) function; the %%[[lloouuwwMMDD]] and %%[[oo00++--]]
  122.        format specifiers are specific to _p_c_a_l:
  123.  
  124.             %a   abbreviated weekday
  125.             %A   full weekday
  126.             %b   abbreviated month name
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PCAL(1)                                                   PCAL(1)
  137.  
  138.  
  139.             %B   full month name
  140.             %d   day of month (1-31)
  141.             %j   day of year (1-366)
  142.             %l   days left in year (0-365)
  143.             %m   month (1-12)
  144.             %U   week number (0-53)
  145.             %W   week number (0-53)
  146.             %u   week number (1-54)
  147.             %w   week number (1-54)
  148.             %y   year w/o century (00-99)
  149.             %Y   year w/century
  150.             %%   `%' character
  151.  
  152.             %o   print number as ordinal
  153.             %0   print number with leading zeroes
  154.             %+   use following month or year
  155.             %-   use previous month or year
  156.             %{+N}[DWMY]    adjust date by +N days/weeks/months/years
  157.             %{-N}[DWMY]    adjust date by -N days/weeks/months/years
  158.  
  159.        The %%uu specifier considers the week containing 1/1 as week
  160.        1 and the following logical Sunday (the first day of the
  161.        week as printed; cf. the --FF option below) as the start of
  162.        week 2; %%UU considers the first logical Sunday as the first
  163.        day of week 1.  %%ww and %%WW behave like %%uu and %%UU respec-
  164.        tively, but use the first logical Monday instead.  Note
  165.        that %%ww ssttrrffttiimmee(())..
  166.  
  167.        The %%oo format specifier